#include<cstdio>//uncle-lu 20190622

int n,s;

int main()
{
	//freopen("in","r",stdin);
	scanf("%d",&n);
	s=0;
	int k=1;
	for(int i=1;i<=n;++i)
	{
		if(i!=1&&i==n){
			s*=2;
		}
		s+=k;
		k+=2;
	}
	printf("%d",s);
	//fclose(stdin);
	return 0;
}
